<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>鸡兔同笼</title>
    <script>
      for (let x = 1; x < 35; x++) {
        for (let y = 1; y < 35; y++) {
          if (x + y == 35 && 2 * x + 4 * y == 94) {
            alert(`鸡: ${x}只, 兔: ${y}只.`)
            break
          }
        }
      }
    </script>
  </head>
  <body></body>
</html>
